﻿using System;
using System.Collections.Generic;
using System.Text;
using KKSG;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;

namespace XMainClient
{
	// Token: 0x020009DF RID: 2527
	internal class XSpriteSystemDocument : XDocComponent
	{
		// Token: 0x17002DF3 RID: 11763
		// (get) Token: 0x06009A23 RID: 39459 RVA: 0x00184C80 File Offset: 0x00182E80
		public override uint ID
		{
			get
			{
				return XSpriteSystemDocument.uuID;
			}
		}

		// Token: 0x17002DF4 RID: 11764
		// (get) Token: 0x06009A24 RID: 39460 RVA: 0x00184C98 File Offset: 0x00182E98
		public XOutlookSprite OutLookData
		{
			get
			{
				return XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.sprite;
			}
		}

		// Token: 0x17002DF5 RID: 11765
		// (get) Token: 0x06009A25 RID: 39461 RVA: 0x00184CBE File Offset: 0x00182EBE
		// (set) Token: 0x06009A26 RID: 39462 RVA: 0x00184CC6 File Offset: 0x00182EC6
		public uint CurrentLotteryType { get; set; }

		// Token: 0x17002DF6 RID: 11766
		// (get) Token: 0x06009A27 RID: 39463 RVA: 0x00184CCF File Offset: 0x00182ECF
		// (set) Token: 0x06009A28 RID: 39464 RVA: 0x00184CD7 File Offset: 0x00182ED7
		public uint NormalMaxCount { get; set; }

		// Token: 0x17002DF7 RID: 11767
		// (get) Token: 0x06009A29 RID: 39465 RVA: 0x00184CE0 File Offset: 0x00182EE0
		// (set) Token: 0x06009A2A RID: 39466 RVA: 0x00184CE8 File Offset: 0x00182EE8
		public uint NormalCoolDown { get; set; }

		// Token: 0x17002DF8 RID: 11768
		// (get) Token: 0x06009A2B RID: 39467 RVA: 0x00184CF1 File Offset: 0x00182EF1
		// (set) Token: 0x06009A2C RID: 39468 RVA: 0x00184CF9 File Offset: 0x00182EF9
		public uint NormalFreeCount { get; set; }

		// Token: 0x17002DF9 RID: 11769
		// (get) Token: 0x06009A2D RID: 39469 RVA: 0x00184D02 File Offset: 0x00182F02
		// (set) Token: 0x06009A2E RID: 39470 RVA: 0x00184D0A File Offset: 0x00182F0A
		public uint SpecialCoolDown { get; set; }

		// Token: 0x17002DFA RID: 11770
		// (get) Token: 0x06009A2F RID: 39471 RVA: 0x00184D13 File Offset: 0x00182F13
		// (set) Token: 0x06009A30 RID: 39472 RVA: 0x00184D1B File Offset: 0x00182F1B
		public uint SpecialSafeCount { get; set; }

		// Token: 0x17002DFB RID: 11771
		// (get) Token: 0x06009A31 RID: 39473 RVA: 0x00184D24 File Offset: 0x00182F24
		// (set) Token: 0x06009A32 RID: 39474 RVA: 0x00184D2C File Offset: 0x00182F2C
		public bool AutoShowEpicSprite { get; set; }

		// Token: 0x17002DFC RID: 11772
		// (get) Token: 0x06009A33 RID: 39475 RVA: 0x00184D38 File Offset: 0x00182F38
		public SpritePreviewTable _SpritePreviewTable
		{
			get
			{
				return XSpriteSystemDocument._spritePreviewTable;
			}
		}

		// Token: 0x17002DFD RID: 11773
		// (get) Token: 0x06009A34 RID: 39476 RVA: 0x00184D50 File Offset: 0x00182F50
		public List<uint> SpriteShowInIllustration
		{
			get
			{
				return XSpriteSystemDocument._spriteShowInIllustration;
			}
		}

		// Token: 0x17002DFE RID: 11774
		// (get) Token: 0x06009A35 RID: 39477 RVA: 0x00184D68 File Offset: 0x00182F68
		public Dictionary<int, List<uint>> _SpriteEggPreviewDict
		{
			get
			{
				return XSpriteSystemDocument._spriteEggIllustrationDict;
			}
		}

		// Token: 0x17002DFF RID: 11775
		// (get) Token: 0x06009A36 RID: 39478 RVA: 0x00184D80 File Offset: 0x00182F80
		public SpriteTable _SpriteTable
		{
			get
			{
				return XSpriteSystemDocument._spriteTable;
			}
		}

		// Token: 0x17002E00 RID: 11776
		// (get) Token: 0x06009A37 RID: 39479 RVA: 0x00184D98 File Offset: 0x00182F98
		public SpriteLevel _SpriteLevelTable
		{
			get
			{
				return XSpriteSystemDocument._spriteLevelTable;
			}
		}

		// Token: 0x17002E01 RID: 11777
		// (get) Token: 0x06009A38 RID: 39480 RVA: 0x00184DB0 File Offset: 0x00182FB0
		public SpriteEvolution _SpriteEvolutionTable
		{
			get
			{
				return XSpriteSystemDocument._spriteEvolutionTable;
			}
		}

		// Token: 0x17002E02 RID: 11778
		// (get) Token: 0x06009A39 RID: 39481 RVA: 0x00184DC8 File Offset: 0x00182FC8
		public SpriteSkill _SpriteSkillTable
		{
			get
			{
				return XSpriteSystemDocument._spriteSkillTable;
			}
		}

		// Token: 0x17002E03 RID: 11779
		// (get) Token: 0x06009A3A RID: 39482 RVA: 0x00184DE0 File Offset: 0x00182FE0
		public List<SpriteInfo> SpriteList
		{
			get
			{
				return this._spriteList;
			}
		}

		// Token: 0x17002E04 RID: 11780
		// (get) Token: 0x06009A3B RID: 39483 RVA: 0x00184DF8 File Offset: 0x00182FF8
		public List<SpriteInfo> ResolveList
		{
			get
			{
				return this._resolveList;
			}
		}

		// Token: 0x17002E05 RID: 11781
		// (get) Token: 0x06009A3C RID: 39484 RVA: 0x00184E10 File Offset: 0x00183010
		public List<ulong> FightingList
		{
			get
			{
				return this._fightingList;
			}
		}

		// Token: 0x17002E06 RID: 11782
		// (get) Token: 0x06009A3D RID: 39485 RVA: 0x00184E28 File Offset: 0x00183028
		public List<bool> BookList
		{
			get
			{
				return this._bookList;
			}
		}

		// Token: 0x17002E07 RID: 11783
		// (get) Token: 0x06009A3E RID: 39486 RVA: 0x00184E40 File Offset: 0x00183040
		public uint MaxFightNum
		{
			get
			{
				return this._maxFightNum;
			}
		}

		// Token: 0x06009A3F RID: 39487 RVA: 0x00184E58 File Offset: 0x00183058
		public static void Execute(OnLoadedCallback callback = null)
		{
			XSpriteSystemDocument.AsyncLoader.AddTask("Table/SpriteTable", XSpriteSystemDocument._spriteTable, false);
			XSpriteSystemDocument.AsyncLoader.AddTask("Table/SpriteLevel", XSpriteSystemDocument._spriteLevelTable, false);
			XSpriteSystemDocument.AsyncLoader.AddTask("Table/SpriteEvolution", XSpriteSystemDocument._spriteEvolutionTable, false);
			XSpriteSystemDocument.AsyncLoader.AddTask("Table/SpriteSkill", XSpriteSystemDocument._spriteSkillTable, false);
			XSpriteSystemDocument.AsyncLoader.AddTask("Table/SpritePreviewTable", XSpriteSystemDocument._spritePreviewTable, false);
			XSpriteSystemDocument.AsyncLoader.Execute(callback);
		}

		// Token: 0x06009A40 RID: 39488 RVA: 0x00184EE0 File Offset: 0x001830E0
		public static void OnTableLoaded()
		{
			XSpriteSystemDocument._levelUpExpDict.Clear();
			for (int i = 0; i < XSpriteSystemDocument._spriteLevelTable.Table.Length; i++)
			{
				SpriteLevel.RowData rowData = XSpriteSystemDocument._spriteLevelTable.Table[i];
				XSpriteSystemDocument._levelUpExpDict[rowData.Quality * XSpriteSystemDocument.K_LEVELUPQUALITY + rowData.Level] = rowData.Exp;
			}
			XSpriteSystemDocument._spriteSkillDict.Clear();
			for (int j = 0; j < XSpriteSystemDocument._spriteSkillTable.Table.Length; j++)
			{
				short skillID = XSpriteSystemDocument._spriteSkillTable.Table[j].SkillID;
				List<SpriteSkill.RowData> value;
				bool flag = !XSpriteSystemDocument._spriteSkillDict.TryGetValue(skillID, out value);
				if (flag)
				{
					value = new List<SpriteSkill.RowData>();
					XSpriteSystemDocument._spriteSkillDict.Add(skillID, value);
				}
				XSpriteSystemDocument._spriteSkillDict[skillID].Add(XSpriteSystemDocument._spriteSkillTable.Table[j]);
			}
			XSpriteSystemDocument._spriteShowInIllustration.Clear();
			for (int k = 0; k < XSpriteSystemDocument._spriteTable.Table.Length; k++)
			{
				bool flag2 = XSpriteSystemDocument._spriteTable.Table[k].IllustrationShow == 1;
				if (flag2)
				{
					XSpriteSystemDocument._spriteShowInIllustration.Add(XSpriteSystemDocument._spriteTable.Table[k].SpriteID);
				}
			}
			XSpriteSystemDocument._spriteEggIllustrationDict.Clear();
			for (int l = 0; l < XSpriteSystemDocument._spritePreviewTable.Table.Length; l++)
			{
				int[] spriteShow = XSpriteSystemDocument._spritePreviewTable.Table[l].SpriteShow;
				bool flag3 = spriteShow == null;
				if (!flag3)
				{
					foreach (int key in spriteShow)
					{
						List<uint> list;
						bool flag4 = !XSpriteSystemDocument._spriteEggIllustrationDict.TryGetValue(key, out list);
						if (flag4)
						{
							list = new List<uint>();
							XSpriteSystemDocument._spriteEggIllustrationDict[key] = list;
						}
						list.Add(XSpriteSystemDocument._spritePreviewTable.Table[l].ItemID);
					}
				}
			}
			for (int n = 0; n < XSpriteSystemDocument._spriteEvolutionTable.Table.Length; n++)
			{
				bool flag5 = (uint)XSpriteSystemDocument._spriteEvolutionTable.Table[n].EvolutionLevel > XSpriteSystemDocument.MAXSTARLEVEL[(int)XSpriteSystemDocument._spriteEvolutionTable.Table[n].Quality];
				if (flag5)
				{
					XSpriteSystemDocument.MAXSTARLEVEL[(int)XSpriteSystemDocument._spriteEvolutionTable.Table[n].Quality] = (uint)XSpriteSystemDocument._spriteEvolutionTable.Table[n].EvolutionLevel;
				}
			}
		}

		// Token: 0x06009A41 RID: 39489 RVA: 0x00185184 File Offset: 0x00183384
		public SpriteSkill.RowData GetMySpriteInitiativeSkill()
		{
			bool flag = this._fightingList.Count == 0 || this._fightingList[0] == 0UL;
			SpriteSkill.RowData result;
			if (flag)
			{
				result = null;
			}
			else
			{
				int indexByUid = this.GetIndexByUid(this._fightingList[0]);
				result = this.GetSpriteInitiativeSkill(this._spriteList[indexByUid].SpriteID, this._spriteList[indexByUid].EvolutionLevel);
			}
			return result;
		}

		// Token: 0x06009A42 RID: 39490 RVA: 0x001851FC File Offset: 0x001833FC
		public SpriteSkill.RowData GetSpriteInitiativeSkill(uint spriteID, uint star)
		{
			SpriteTable.RowData bySpriteID = XSpriteSystemDocument._spriteTable.GetBySpriteID(spriteID);
			return this.GetSpriteSkillData((short)bySpriteID.SpriteSkillID, true, star);
		}

		// Token: 0x06009A43 RID: 39491 RVA: 0x0018522C File Offset: 0x0018342C
		public override void OnEnterSceneFinally()
		{
			bool flag = this._maxFightNum == 0U;
			if (flag)
			{
				this.DealWithPositionLevelCondition();
			}
		}

		// Token: 0x06009A44 RID: 39492 RVA: 0x00185250 File Offset: 0x00183450
		private int Compare(SpriteInfo x, SpriteInfo y)
		{
			bool flag = x.uid == y.uid;
			int result;
			if (flag)
			{
				result = 0;
			}
			else
			{
				bool flag2 = this.isSpriteFight(x.uid) != this.isSpriteFight(y.uid);
				if (flag2)
				{
					result = (this.isSpriteFight(x.uid) ? -1 : 1);
				}
				else
				{
					result = (int)(y.PowerPoint - x.PowerPoint);
				}
			}
			return result;
		}

		// Token: 0x06009A45 RID: 39493 RVA: 0x001852BB File Offset: 0x001834BB
		public void SortList()
		{
			this._spriteList.Sort(new Comparison<SpriteInfo>(this.Compare));
			this.CalNeed2FightSprite();
			this._resolveList.Sort(new Comparison<SpriteInfo>(this.Compare));
		}

		// Token: 0x06009A46 RID: 39494 RVA: 0x001852F8 File Offset: 0x001834F8
		public SpriteSkill.RowData GetSpriteSkillData(short skillID, bool mainSkill, uint starLevel)
		{
			List<SpriteSkill.RowData> list;
			bool flag = XSpriteSystemDocument._spriteSkillDict.TryGetValue(skillID, out list);
			if (flag)
			{
				bool flag2 = !mainSkill;
				if (flag2)
				{
					bool flag3 = list.Count > 0;
					if (flag3)
					{
						return list[0];
					}
				}
				else
				{
					uint num = starLevel + 1U;
					for (int i = 0; i < list.Count; i++)
					{
						bool flag4 = (uint)list[i].SkillQuality == num;
						if (flag4)
						{
							return list[i];
						}
					}
				}
			}
			return null;
		}

		// Token: 0x06009A47 RID: 39495 RVA: 0x0018538C File Offset: 0x0018358C
		public override void OnAttachToHost(XObject host)
		{
			base.OnAttachToHost(host);
			this.SpriteRedPointShowIntervel = XSingleton<XGlobalConfig>.singleton.GetInt("SpriteRedPointShowIntervel");
			for (int i = 0; i < 6; i++)
			{
				this.NAMECOLOR[i] = XSingleton<XGlobalConfig>.singleton.GetValue(string.Format("Quality{0}Color", i));
			}
			for (int j = 0; j < 4; j++)
			{
				this._fightingList.Add(0UL);
			}
			this.GroupRatio = (uint)XSingleton<XGlobalConfig>.singleton.GetInt("SpriteGrowUpRatio");
			this.NormalMaxCount = (uint)XSingleton<XGlobalConfig>.singleton.GetInt("SpriteGoldDrawFreeDayCount");
			this._showExpTime = double.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteExpShowTime"));
			this.FoodList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("SpriteFoodExp", false);
			this._starUpLimitLevel = XSingleton<XGlobalConfig>.singleton.GetInt("SpriteEvolutionMinLevel");
			XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
			PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Commerce);
		}

		// Token: 0x06009A48 RID: 39496 RVA: 0x00185490 File Offset: 0x00183690
		protected override void EventSubscribe()
		{
			base.EventSubscribe();
			base.RegisterEvent(XEventDefine.XEvent_BuffChange, new XComponent.XEventHandler(this._OnBuffChange));
			base.RegisterEvent(XEventDefine.XEvent_AddItem, new XComponent.XEventHandler(this.OnAddItem));
			base.RegisterEvent(XEventDefine.XEvent_RemoveItem, new XComponent.XEventHandler(this.OnRemoveItem));
			base.RegisterEvent(XEventDefine.XEvent_PlayerLevelChange, new XComponent.XEventHandler(this.OnPlayerLevelChange));
		}

		// Token: 0x06009A49 RID: 39497 RVA: 0x00185500 File Offset: 0x00183700
		protected bool OnAddItem(XEventArgs args)
		{
			XAddItemEventArgs xaddItemEventArgs = args as XAddItemEventArgs;
			for (int i = 0; i < xaddItemEventArgs.items.Count; i++)
			{
				bool flag = xaddItemEventArgs.items[i].Type == ItemType.SPRITEFOOD;
				if (flag)
				{
					this.CalSpriteMainRedPoint();
					return true;
				}
			}
			return true;
		}

		// Token: 0x06009A4A RID: 39498 RVA: 0x00185560 File Offset: 0x00183760
		protected bool OnRemoveItem(XEventArgs args)
		{
			XRemoveItemEventArgs xremoveItemEventArgs = args as XRemoveItemEventArgs;
			for (int i = 0; i < xremoveItemEventArgs.types.Count; i++)
			{
				bool flag = xremoveItemEventArgs.types[i] == ItemType.SPRITEFOOD;
				if (flag)
				{
					this.CalSpriteMainRedPoint();
					return true;
				}
			}
			return true;
		}

		// Token: 0x06009A4B RID: 39499 RVA: 0x001855B8 File Offset: 0x001837B8
		public int GetIndexByUid(ulong uid)
		{
			for (int i = 0; i < this._spriteList.Count; i++)
			{
				bool flag = this._spriteList[i].uid == uid;
				if (flag)
				{
					return i;
				}
			}
			XSingleton<XDebug>.singleton.AddErrorLog(string.Format("Can't find the index by uid = {0}", uid), null, null, null, null, null);
			return -1;
		}

		// Token: 0x06009A4C RID: 39500 RVA: 0x00185623 File Offset: 0x00183823
		protected override void OnReconnected(XReconnectedEventArgs arg)
		{
			this.SetAllInfo(arg.PlayerInfo.SpriteRecord);
		}

		// Token: 0x06009A4D RID: 39501 RVA: 0x00185638 File Offset: 0x00183838
		public void DealWithPositionLevelCondition()
		{
			this.PositionLevelCondition = XSingleton<XGlobalConfig>.singleton.GetUIntList("SpritePositionLevel");
			bool flag = this.PositionLevelCondition.Count != 4;
			if (flag)
			{
				XSingleton<XDebug>.singleton.AddErrorLog("Error! get PositionLevelCondition's cout from globalconfig error! the cout isn't 4", null, null, null, null, null);
			}
			uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
			this._maxFightNum = 4U;
			for (int i = 0; i < this.PositionLevelCondition.Count; i++)
			{
				bool flag2 = this.PositionLevelCondition[i] > level;
				if (flag2)
				{
					this._maxFightNum = (uint)i;
					break;
				}
			}
			this.CalNeed2FightSprite();
			bool flag3 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame != null;
			if (flag3)
			{
				DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame.RefreshPosition();
			}
		}

		// Token: 0x06009A4E RID: 39502 RVA: 0x00185704 File Offset: 0x00183904
		private void CalNeed2FightSprite()
		{
			this._redPointSpriteHash.Clear();
			int num = (int)(this._maxFightNum - (uint)this._fightHash.Count);
			bool flag = num <= 0;
			if (flag)
			{
				this.CalSpriteFightRedPoint();
			}
			else
			{
				HashSet<ulong> hashSet = new HashSet<ulong>();
				for (int i = 0; i < num; i++)
				{
					int num2 = -1;
					for (int j = 0; j < this._spriteList.Count; j++)
					{
						bool flag2 = this._fightHash.Contains(this._spriteList[j].uid);
						if (!flag2)
						{
							bool flag3 = hashSet.Contains(this._spriteList[j].uid);
							if (!flag3)
							{
								bool flag4 = num2 == -1;
								if (flag4)
								{
									num2 = j;
								}
								else
								{
									bool flag5 = this._spriteList[j].PowerPoint > this._spriteList[num2].PowerPoint;
									if (flag5)
									{
										num2 = j;
									}
								}
							}
						}
					}
					bool flag6 = num2 == -1;
					if (flag6)
					{
						break;
					}
					hashSet.Add(this._spriteList[num2].uid);
					this._redPointSpriteHash.Add(this._spriteList[num2].uid);
				}
				this.CalSpriteFightRedPoint();
			}
		}

		// Token: 0x06009A4F RID: 39503 RVA: 0x0018586C File Offset: 0x00183A6C
		public void SetAllInfo(SpriteRecord data)
		{
			bool flag = data == null;
			if (flag)
			{
				this._bookList = new List<bool>(new bool[XSpriteSystemDocument._spriteTable.Table.Length]);
				XSingleton<XDebug>.singleton.AddLog("Get sprite Info from server is null.", null, null, null, null, null, XDebugColor.XDebug_None);
			}
			else
			{
				this._bookList = data.Books;
				this._spriteList = data.SpriteData;
				this._AwakeSpriteData = data.NewAwake;
				this.SetFightList(data.InFight);
				this.SortList();
				this.CheckView();
			}
		}

		// Token: 0x06009A50 RID: 39504 RVA: 0x001858F8 File Offset: 0x00183AF8
		private void SetOutLookData()
		{
			bool flag = this._fightingList[0] == 0UL;
			if (flag)
			{
				bool flag2 = this.OutLookData.leaderid == 0U;
				if (flag2)
				{
					return;
				}
				XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.SetSpriteData(0U);
			}
			else
			{
				int indexByUid = this.GetIndexByUid(this._fightingList[0]);
				bool flag3 = this.OutLookData.leaderid == this._spriteList[indexByUid].SpriteID;
				if (flag3)
				{
					return;
				}
				XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.SetSpriteData(this._spriteList[indexByUid].SpriteID);
			}
			bool flag4 = XSingleton<XEntityMgr>.singleton.Player != null;
			if (flag4)
			{
				XEquipComponent xequipComponent = XSingleton<XEntityMgr>.singleton.Player.GetXComponent(XEquipComponent.uuID) as XEquipComponent;
				uint presentID = xequipComponent.SpriteFromAttr();
				XSingleton<X3DAvatarMgr>.singleton.OnSpriteChanged(XSingleton<XEntityMgr>.singleton.Player, presentID);
			}
		}

		// Token: 0x06009A51 RID: 39505 RVA: 0x001859FC File Offset: 0x00183BFC
		private void SetFightList(List<ulong> list)
		{
			bool flag = list.Count != 4;
			if (flag)
			{
				this._fightingList.Clear();
				for (int i = 0; i < 4; i++)
				{
					this._fightingList.Add(0UL);
				}
			}
			else
			{
				this._fightingList = list;
			}
			this.SetOutLookData();
			this.FightHashChange();
		}

		// Token: 0x06009A52 RID: 39506 RVA: 0x00185A60 File Offset: 0x00183C60
		private void FightHashChange()
		{
			this._fightHash.Clear();
			for (int i = 0; i < this._fightingList.Count; i++)
			{
				bool flag = this._fightingList[i] > 0UL;
				if (flag)
				{
					this._fightHash.Add(this._fightingList[i]);
				}
			}
			this.DealWithResolveList();
		}

		// Token: 0x06009A53 RID: 39507 RVA: 0x00185ACC File Offset: 0x00183CCC
		public bool isSpriteFight(ulong uid)
		{
			return this._fightHash.Contains(uid);
		}

		// Token: 0x06009A54 RID: 39508 RVA: 0x00185AEC File Offset: 0x00183CEC
		public bool isFightFull()
		{
			return (long)this._fightHash.Count == (long)((ulong)this._maxFightNum);
		}

		// Token: 0x06009A55 RID: 39509 RVA: 0x00185B14 File Offset: 0x00183D14
		public bool isSpriteNeed2Fight(int index)
		{
			return this._redPointSpriteHash.Contains(this._spriteList[index].uid);
		}

		// Token: 0x06009A56 RID: 39510 RVA: 0x00185B42 File Offset: 0x00183D42
		public void CalSpriteFightRedPoint()
		{
			XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_SpriteSystem_Fight, this._redPointSpriteHash.Count != 0);
			XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_SpriteSystem, true);
			this.CalSpriteMainRedPoint();
		}

		// Token: 0x06009A57 RID: 39511 RVA: 0x00185B7C File Offset: 0x00183D7C
		public void CalSpriteMainRedPoint()
		{
			bool bState = !this.isSpriteFoodEmpty() && this.isFightSpriteNeed2Feed(true);
			XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_SpriteSystem_Main, bState);
			XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_SpriteSystem, true);
		}

		// Token: 0x06009A58 RID: 39512 RVA: 0x00185BC0 File Offset: 0x00183DC0
		public uint GetSpriteQuality(int index)
		{
			return XSpriteSystemDocument._spriteTable.GetBySpriteID(this._spriteList[index].SpriteID).SpriteQuality;
		}

		// Token: 0x06009A59 RID: 39513 RVA: 0x00185BF4 File Offset: 0x00183DF4
		public uint GetSpriteLevelUpExp(int index)
		{
			uint result = 0U;
			uint key = this.GetSpriteQuality(index) * XSpriteSystemDocument.K_LEVELUPQUALITY + this._spriteList[index].Level;
			bool flag = !XSpriteSystemDocument._levelUpExpDict.TryGetValue(key, out result);
			if (flag)
			{
				XSingleton<XDebug>.singleton.AddErrorLog(string.Format("Can't find the sprite's exp, quality = {0}, level = {1}.", this.GetSpriteQuality(index), this._spriteList[index].Level), null, null, null, null, null);
			}
			return result;
		}

		// Token: 0x06009A5A RID: 39514 RVA: 0x00185C7C File Offset: 0x00183E7C
		public uint GetSpriteLevelUpExpByLevel(int index, int level)
		{
			uint result = 0U;
			uint key = this.GetSpriteQuality(index) * XSpriteSystemDocument.K_LEVELUPQUALITY + (uint)level;
			bool flag = !XSpriteSystemDocument._levelUpExpDict.TryGetValue(key, out result);
			if (flag)
			{
				XSingleton<XDebug>.singleton.AddErrorLog(string.Format("Can't find the sprite's exp, quality = {0}, level = {1}.", this.GetSpriteQuality(index), this._spriteList[index].Level), null, null, null, null, null);
			}
			return result;
		}

		// Token: 0x06009A5B RID: 39515 RVA: 0x00185CF4 File Offset: 0x00183EF4
		public SpriteEvolution.RowData GetStarUpData(uint quality, uint star)
		{
			for (int i = 0; i < XSpriteSystemDocument._spriteEvolutionTable.Table.Length; i++)
			{
				SpriteEvolution.RowData rowData = XSpriteSystemDocument._spriteEvolutionTable.Table[i];
				bool flag = (uint)rowData.Quality == quality && (uint)rowData.EvolutionLevel == star + 1U;
				if (flag)
				{
					return rowData;
				}
			}
			XSingleton<XDebug>.singleton.AddErrorLog(string.Format("Can't find the sprite starUp's condition from SpriteEvolution.txt, quality = {0}, star = {1}.", quality, star + 1U), null, null, null, null, null);
			return null;
		}

		// Token: 0x06009A5C RID: 39516 RVA: 0x00185D7C File Offset: 0x00183F7C
		public double CalAptitude(uint AttrID, double AttrValue, XAttributes attributes = null)
		{
			return XSingleton<XPowerPointCalculator>.singleton.GetPPT(AttrID, AttrValue, null, 0) * this.GroupRatio;
		}

		// Token: 0x06009A5D RID: 39517 RVA: 0x00185DA8 File Offset: 0x00183FA8
		public double GetMaxAptitude(uint spriteID, int index)
		{
			SpriteTable.RowData bySpriteID = XSpriteSystemDocument._spriteTable.GetBySpriteID(spriteID);
			double result;
			switch (index)
			{
			case 0:
				result = this.CalAptitude(bySpriteID.AttrID1, bySpriteID.Range1[1], null);
				break;
			case 1:
				result = this.CalAptitude(bySpriteID.AttrID2, bySpriteID.Range2[1], null);
				break;
			case 2:
				result = this.CalAptitude(bySpriteID.AttrID3, bySpriteID.Range3[1], null);
				break;
			case 3:
				result = this.CalAptitude(bySpriteID.AttrID4, bySpriteID.Range4[1], null);
				break;
			case 4:
				result = this.CalAptitude(bySpriteID.AttrID5, bySpriteID.Range5[1], null);
				break;
			default:
				XSingleton<XDebug>.singleton.AddErrorLog("GetMaxAptitude error. index is out of the range. index = ", index.ToString(), null, null, null, null);
				result = 0.0;
				break;
			}
			return result;
		}

		// Token: 0x06009A5E RID: 39518 RVA: 0x00185EAC File Offset: 0x001840AC
		public void OnSpriteChange(PtcG2C_SpriteChangedNtf ptc)
		{
			bool flag = ptc.Data.NewSprites.Count != 0;
			if (flag)
			{
				this.DealWithSpriteAdd(ptc.Data.NewSprites);
			}
			bool flag2 = ptc.Data.ChangedSprites.Count != 0;
			if (flag2)
			{
				this.DealWithSpriteChange(ptc.Data.ChangedSprites);
			}
			bool flag3 = ptc.Data.RemovedSprites.Count != 0;
			if (flag3)
			{
				this.DealWithSpriteRemove(ptc.Data.RemovedSprites);
			}
			this.CalNeed2FightSprite();
			this.CheckView();
		}

		// Token: 0x06009A5F RID: 39519 RVA: 0x00185F44 File Offset: 0x00184144
		private void DealWithSpriteAdd(List<SpriteInfo> list)
		{
			for (int i = 0; i < list.Count; i++)
			{
				this._spriteList.Add(list[i]);
				int num = -1;
				for (int j = 0; j < XSpriteSystemDocument._spriteTable.Table.Length; j++)
				{
					bool flag = list[i].SpriteID == XSpriteSystemDocument._spriteTable.Table[j].SpriteID;
					if (flag)
					{
						num = j;
						break;
					}
				}
				bool flag2 = num < this._bookList.Count && num >= 0;
				if (flag2)
				{
					this._bookList[num] = true;
				}
			}
			this.DealWithResolveList();
		}

		// Token: 0x06009A60 RID: 39520 RVA: 0x00186000 File Offset: 0x00184200
		private void DealWithSpriteChange(List<SpriteInfo> list)
		{
			Dictionary<ulong, SpriteInfo> dictionary = new Dictionary<ulong, SpriteInfo>();
			for (int i = 0; i < list.Count; i++)
			{
				dictionary[list[i].uid] = list[i];
			}
			SpriteInfo value = null;
			for (int j = 0; j < this._spriteList.Count; j++)
			{
				bool flag = dictionary.TryGetValue(this._spriteList[j].uid, out value);
				if (flag)
				{
					this._spriteList[j] = value;
				}
			}
		}

		// Token: 0x06009A61 RID: 39521 RVA: 0x00186098 File Offset: 0x00184298
		private void DealWithSpriteRemove(List<ulong> list)
		{
			List<SpriteInfo> list2 = new List<SpriteInfo>();
			HashSet<ulong> hashSet = new HashSet<ulong>();
			for (int i = 0; i < list.Count; i++)
			{
				hashSet.Add(list[i]);
			}
			for (int j = 0; j < this._spriteList.Count; j++)
			{
				bool flag = !hashSet.Contains(this._spriteList[j].uid);
				if (flag)
				{
					list2.Add(this._spriteList[j]);
				}
			}
			this._spriteList = list2;
			this.DealWithResolveList();
		}

		// Token: 0x06009A62 RID: 39522 RVA: 0x0018613C File Offset: 0x0018433C
		public void DealWithResolveList()
		{
			this._resolveList.Clear();
			for (int i = 0; i < this._spriteList.Count; i++)
			{
				bool flag = !this.isSpriteFight(this._spriteList[i].uid);
				if (flag)
				{
					this._resolveList.Add(this._spriteList[i]);
				}
			}
		}

		// Token: 0x06009A63 RID: 39523 RVA: 0x001861A8 File Offset: 0x001843A8
		private void LevelUp()
		{
			XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteLevelUpTips"), "fece00");
			bool flag = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.IsVisible();
			if (flag)
			{
				DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame._SpriteSelectHandler.SetSpriteList(this._spriteList, false);
			}
		}

		// Token: 0x06009A64 RID: 39524 RVA: 0x00186210 File Offset: 0x00184410
		public bool QueryFeedSprite(int index, uint feedItemID)
		{
			bool flag = index > this._spriteList.Count;
			bool result;
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteNull"), "fece00");
				result = false;
			}
			else
			{
				bool flag2 = this.SpriteList[index].Level >= XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
				if (flag2)
				{
					XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_SPRITE_LEVELMAX"), "fece00");
					result = false;
				}
				else
				{
					bool flag3 = XBagDocument.BagDoc.GetItemCount((int)feedItemID) <= 0UL;
					if (flag3)
					{
						XSingleton<UiUtility>.singleton.ShowItemAccess((int)feedItemID, null);
						result = false;
					}
					else
					{
						XSingleton<XDebug>.singleton.AddLog(string.Format("Feed sprite index : {0},  food : {1}", index, feedItemID), null, null, null, null, null, XDebugColor.XDebug_None);
						RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
						rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_Feed;
						rpcC2G_SpriteOperation.oArg.uid = this._spriteList[index].uid;
						rpcC2G_SpriteOperation.oArg.FeedItemID = feedItemID;
						XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
						result = true;
					}
				}
			}
			return result;
		}

		// Token: 0x06009A65 RID: 39525 RVA: 0x0018633C File Offset: 0x0018453C
		public void QueryTrain(int index, List<uint> lockAttrList)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_Train;
			rpcC2G_SpriteOperation.oArg.uid = this._spriteList[index].uid;
			for (int i = 0; i < lockAttrList.Count; i++)
			{
				rpcC2G_SpriteOperation.oArg.notToChoose.Add(lockAttrList[i]);
			}
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A66 RID: 39526 RVA: 0x001863B4 File Offset: 0x001845B4
		public void QueryResetTrain(int index, SpriteType type, uint costChoose = 0U)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = type;
			rpcC2G_SpriteOperation.oArg.uid = this._spriteList[index].uid;
			rpcC2G_SpriteOperation.oArg.resetTrainChoose = costChoose;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A67 RID: 39527 RVA: 0x0018640C File Offset: 0x0018460C
		public void QueryStarUp(int index)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_Evolution;
			rpcC2G_SpriteOperation.oArg.uid = this._spriteList[index].uid;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A68 RID: 39528 RVA: 0x00186458 File Offset: 0x00184658
		public void QueryFightOut(ulong uid)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_OutFight;
			rpcC2G_SpriteOperation.oArg.uid = uid;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A69 RID: 39529 RVA: 0x00186494 File Offset: 0x00184694
		public void QueryFightIn(ulong uid)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_InFight;
			rpcC2G_SpriteOperation.oArg.uid = uid;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A6A RID: 39530 RVA: 0x001864D0 File Offset: 0x001846D0
		public void QuerySwapTeamLeader(ulong uid)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_SwapLeader;
			rpcC2G_SpriteOperation.oArg.uid = uid;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A6B RID: 39531 RVA: 0x0018650C File Offset: 0x0018470C
		public void QueryOpenStarUpWindow(ulong uid)
		{
			bool flag = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)this._starUpLimitLevel);
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SpriteStarUpLevelLimit"), this._starUpLimitLevel), "fece00");
			}
			else
			{
				RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
				rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_QueryEvolutionPPT;
				rpcC2G_SpriteOperation.oArg.uid = uid;
				XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
			}
		}

		// Token: 0x06009A6C RID: 39532 RVA: 0x00186594 File Offset: 0x00184794
		public void QueryResolveSprite(List<SpriteInfo> list)
		{
			RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
			rpcC2G_SpriteOperation.oArg.Type = SpriteType.Sprite_Decompose;
			rpcC2G_SpriteOperation.oArg.uids.Clear();
			for (int i = 0; i < list.Count; i++)
			{
				rpcC2G_SpriteOperation.oArg.uids.Add(list[i].uid);
			}
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
		}

		// Token: 0x06009A6D RID: 39533 RVA: 0x00186608 File Offset: 0x00184808
		public void CheckView()
		{
			bool flag = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.IsVisible();
			if (flag)
			{
				DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame._SpriteSelectHandler.SetSpriteList(this._spriteList, false);
			}
			bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.IsVisible();
			if (flag2)
			{
				DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame._SpriteSelectHandler.SetSpriteList(this._resolveList, true);
			}
			bool flag3 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.IsVisible();
			if (flag3)
			{
				bool flag4 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick < this.SpriteList.Count;
				if (flag4)
				{
					SpriteInfo spriteData = this.SpriteList[DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick];
					DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame._SpritePropertyHandler.SetSpriteAttributeInfo(spriteData, XSingleton<XAttributeMgr>.singleton.XPlayerData, null);
					DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame._SpriteAvatarHandler.SetSpriteInfo(spriteData, XSingleton<XAttributeMgr>.singleton.XPlayerData, 0, false, false);
				}
			}
		}

		// Token: 0x06009A6E RID: 39534 RVA: 0x00186744 File Offset: 0x00184944
		public void SendLotteryRpc(uint lotteryType)
		{
			bool flag = Time.time - this.LastLotteryTime < 3f;
			if (!flag)
			{
				this.LastLotteryTime = Time.time;
				this.CurrentLotteryType = lotteryType;
				RpcC2G_DrawLottery rpcC2G_DrawLottery = new RpcC2G_DrawLottery();
				rpcC2G_DrawLottery.oArg.type = lotteryType;
				XSingleton<XClientNetwork>.singleton.Send(rpcC2G_DrawLottery);
			}
		}

		// Token: 0x06009A6F RID: 39535 RVA: 0x001867A0 File Offset: 0x001849A0
		public void SendBuySpriteEggRpc(uint lotteryType)
		{
			RpcC2G_BuySpriteEgg rpcC2G_BuySpriteEgg = new RpcC2G_BuySpriteEgg();
			rpcC2G_BuySpriteEgg.oArg.type = lotteryType;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_BuySpriteEgg);
		}

		// Token: 0x06009A70 RID: 39536 RVA: 0x001867D0 File Offset: 0x001849D0
		public void QueryBuyEggCD()
		{
			RpcC2G_QueryLotteryCD rpc = new RpcC2G_QueryLotteryCD();
			XSingleton<XClientNetwork>.singleton.Send(rpc);
		}

		// Token: 0x06009A71 RID: 39537 RVA: 0x001867F0 File Offset: 0x001849F0
		public void OnQueryLotteryCD(uint normalCoolDown, uint specialCoolDown, uint normalFreeCount, uint specialSafeCount)
		{
			this.SpecialSafeCount = specialSafeCount;
			this.SetBuyEggData(normalCoolDown, specialCoolDown, normalFreeCount);
			this.RefreshSafeCountUI();
		}

		// Token: 0x06009A72 RID: 39538 RVA: 0x00186810 File Offset: 0x00184A10
		public void SetBuyEggData(uint normalCoolDown, uint specialCoolDown, uint normalFreeCount)
		{
			this.NormalCoolDown = normalCoolDown;
			this.NormalFreeCount = normalFreeCount;
			this.SpecialCoolDown = specialCoolDown;
			XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_SpriteSystem_Shop, (this.NormalCoolDown == 0U && this.NormalFreeCount != this.NormalMaxCount) || this.SpecialCoolDown == 0U);
			XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_SpriteSystem_Shop, true);
			bool flag = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler == null;
			if (!flag)
			{
				bool flag2 = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler.IsVisible();
				if (!flag2)
				{
					DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler.RefreshLotteryFrame();
				}
			}
		}

		// Token: 0x06009A73 RID: 39539 RVA: 0x001868B4 File Offset: 0x00184AB4
		public void SetBuyEggItem(List<ItemBrief> item)
		{
			bool flag = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
			if (!flag)
			{
				bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler == null;
				if (!flag2)
				{
					bool flag3 = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler.IsVisible();
					if (!flag3)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteShopHandler.ShowResultFrame(item);
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.CheckSpriteSummonRedpoint();
					}
				}
			}
		}

		// Token: 0x06009A74 RID: 39540 RVA: 0x0018691C File Offset: 0x00184B1C
		public void SetLotteryData(uint specialSafeCount)
		{
			this.SpecialSafeCount = specialSafeCount;
			this.RefreshSafeCountUI();
		}

		// Token: 0x06009A75 RID: 39541 RVA: 0x00186930 File Offset: 0x00184B30
		private void RefreshSafeCountUI()
		{
			bool flag = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
			if (!flag)
			{
				bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler == null;
				if (!flag2)
				{
					bool flag3 = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler.IsVisible();
					if (!flag3)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler.RefreshSafeCountUI();
					}
				}
			}
		}

		// Token: 0x06009A76 RID: 39542 RVA: 0x0018698C File Offset: 0x00184B8C
		public void SetLotteryResultData(List<ItemBrief> itemList, List<uint> spritePPT, LotteryType type)
		{
			this.CachedLotteryResult.Clear();
			this.ResultShowList.Clear();
			this.CachedLotteryPPT.Clear();
			int num = 0;
			for (int i = 0; i < itemList.Count; i++)
			{
				this.CachedLotteryResult.Add(itemList[i]);
				ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemList[i].itemID);
				this.ResultShowList.Add(itemConf != null && itemConf.ItemType == 18 && itemConf.ItemQuality > 2);
				bool flag = itemConf != null && itemConf.ItemType == 18 && num < spritePPT.Count;
				if (flag)
				{
					this.CachedLotteryPPT.Add(spritePPT[num]);
					num++;
				}
				else
				{
					this.CachedLotteryPPT.Add(0U);
				}
			}
			bool flag2 = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
			if (!flag2)
			{
				bool flag3 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler == null;
				if (!flag3)
				{
					bool flag4 = !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler.IsVisible();
					if (!flag4)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.CheckSpriteSummonRedpoint();
						if (type - LotteryType.Sprite_Draw_One > 2)
						{
							if (type - LotteryType.Sprite_GoldDraw_One <= 2)
							{
								this.PlayLotteryCutscene("CutScene/Spirit_lottery_cutscene_fall_gold", false, true);
							}
						}
						else
						{
							this.PlayLotteryCutscene("CutScene/Spirit_lottery_cutscene_fall_diamond", false, true);
						}
						XSingleton<XTimerMgr>.singleton.SetTimer(XSingleton<XCutScene>.singleton.Length - 0.05f, new XTimerMgr.ElapsedEventHandler(this.RestoreLotteryUI), null);
					}
				}
			}
		}

		// Token: 0x06009A77 RID: 39543 RVA: 0x00186B24 File Offset: 0x00184D24
		public void EpicSpriteShow(int id)
		{
			this.ResultShowList[id] = false;
			this.PlayLotteryCutscene("CutScene/Spirit_lottery_cutscene_short", false, false);
			XSingleton<XTimerMgr>.singleton.SetTimer(XSingleton<XCutScene>.singleton.Length - 0.05f, new XTimerMgr.ElapsedEventHandler(this.RestoreLotteryResultUI), id);
		}

		// Token: 0x06009A78 RID: 39544 RVA: 0x00186B7C File Offset: 0x00184D7C
		private void PlayLotteryCutscene(string path, bool bFadeAtBegin, bool bFadeAtEnd)
		{
			XSingleton<XCutScene>.singleton.Start(path, bFadeAtBegin, bFadeAtEnd);
			XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = true;
			XSingleton<XTimerMgr>.singleton.SetTimer(0.05f, new XTimerMgr.ElapsedEventHandler(this.HideAllUIWithOutCall), null);
		}

		// Token: 0x06009A79 RID: 39545 RVA: 0x00186BCB File Offset: 0x00184DCB
		private void RestoreUI(object o = null)
		{
			XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = false;
			XSingleton<UIManager>.singleton.RestoreAllUIWithOutCall();
		}

		// Token: 0x06009A7A RID: 39546 RVA: 0x00186BEF File Offset: 0x00184DEF
		private void HideAllUIWithOutCall(object o)
		{
			XSingleton<UIManager>.singleton.HideAllUIWithOutCall();
		}

		// Token: 0x06009A7B RID: 39547 RVA: 0x00186C00 File Offset: 0x00184E00
		private void SendWorldNotice(uint itemid)
		{
			PtcC2G_OpenSpriteEggNtf ptcC2G_OpenSpriteEggNtf = new PtcC2G_OpenSpriteEggNtf();
			ptcC2G_OpenSpriteEggNtf.Data.itemid = itemid;
			XSingleton<XClientNetwork>.singleton.Send(ptcC2G_OpenSpriteEggNtf);
		}

		// Token: 0x06009A7C RID: 39548 RVA: 0x00186C2D File Offset: 0x00184E2D
		private void RestoreLotteryUI(object o)
		{
			this.RestoreUI(null);
			DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteLotteryHandler.ShowResultFrame();
		}

		// Token: 0x06009A7D RID: 39549 RVA: 0x00186C48 File Offset: 0x00184E48
		private void RestoreLotteryResultUI(object o)
		{
			int index = (int)o;
			this.SendWorldNotice(this.CachedLotteryResult[index].itemID);
			this.RestoreUI(null);
			DlgBase<XSpriteShowView, XSpriteShowBehaviour>.singleton.ShowDetail(this.CachedLotteryResult[index].itemID, this.CachedLotteryPPT[index], true);
		}

		// Token: 0x06009A7E RID: 39550 RVA: 0x00186CA8 File Offset: 0x00184EA8
		public bool isSpriteFoodEmpty()
		{
			ulong num = 0UL;
			for (int i = 0; i < (int)this.FoodList.Count; i++)
			{
				num += XBagDocument.BagDoc.GetItemCount(this.FoodList[i, 0]);
			}
			return num == 0UL;
		}

		// Token: 0x06009A7F RID: 39551 RVA: 0x00186CF8 File Offset: 0x00184EF8
		public bool isFightSpriteNeed2Feed(bool outView)
		{
			for (int i = 0; i < this._fightingList.Count; i++)
			{
				bool flag = this._fightingList[i] == 0UL;
				if (!flag)
				{
					bool flag2 = this.isSpriteNeed2Feed(this._fightingList[i], outView);
					if (flag2)
					{
						return true;
					}
				}
			}
			return false;
		}

		// Token: 0x06009A80 RID: 39552 RVA: 0x00186D5C File Offset: 0x00184F5C
		public bool isSpriteNeed2Feed(ulong uid, bool outView)
		{
			int indexByUid = this.GetIndexByUid(uid);
			bool result;
			if (outView)
			{
				result = ((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level >= (ulong)this._spriteList[indexByUid].Level + (ulong)((long)this.SpriteRedPointShowIntervel) && this.isSpriteCanLevelUp(indexByUid));
			}
			else
			{
				result = (XSingleton<XAttributeMgr>.singleton.XPlayerData.Level > this._spriteList[indexByUid].Level && this.isSpriteCanLevelUp(indexByUid));
			}
			return result;
		}

		// Token: 0x06009A81 RID: 39553 RVA: 0x00186DE0 File Offset: 0x00184FE0
		private bool isSpriteCanLevelUp(int index)
		{
			int num = 0;
			for (int i = 0; i < (int)this.FoodList.Count; i++)
			{
				num += (int)XBagDocument.BagDoc.GetItemCount(this.FoodList[i, 0]) * this.FoodList[i, 1];
			}
			return this._spriteList[index].Exp + (uint)num >= this.GetSpriteLevelUpExp(index);
		}

		// Token: 0x06009A82 RID: 39554 RVA: 0x00186E58 File Offset: 0x00185058
		public XFx CreateAndPlayFx(string path, Transform parent)
		{
			XFx xfx = XSingleton<XFxMgr>.singleton.CreateFx(path, null, true);
			bool flag = xfx == null;
			XFx result;
			if (flag)
			{
				result = null;
			}
			else
			{
				xfx.Play(parent, Vector3.zero, Vector3.one, 1f, true, false);
				result = xfx;
			}
			return result;
		}

		// Token: 0x06009A83 RID: 39555 RVA: 0x00186EA0 File Offset: 0x001850A0
		public void DestroyFx(XFx fx)
		{
			bool flag = fx == null;
			if (!flag)
			{
				XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
			}
		}

		// Token: 0x06009A84 RID: 39556 RVA: 0x00186EC8 File Offset: 0x001850C8
		public void ReqSpriteOperation(SpriteType type)
		{
			int currentClick = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick;
			bool flag = currentClick >= this.SpriteList.Count;
			if (!flag)
			{
				RpcC2G_SpriteOperation rpcC2G_SpriteOperation = new RpcC2G_SpriteOperation();
				rpcC2G_SpriteOperation.oArg.Type = type;
				rpcC2G_SpriteOperation.oArg.uid = this.SpriteList[currentClick].uid;
				XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SpriteOperation);
			}
		}

		// Token: 0x06009A85 RID: 39557 RVA: 0x00186F3C File Offset: 0x0018513C
		public void OnSpriteOperation(SpriteOperationArg oArg, SpriteOperationRes oRes)
		{
			bool flag = oRes.ErrorCode > ErrorCode.ERR_SUCCESS;
			if (flag)
			{
				XSingleton<UiUtility>.singleton.ShowSystemTip(oRes.ErrorCode, "fece00");
				ErrorCode errorCode = oRes.ErrorCode;
				if (errorCode == ErrorCode.ERR_SPRITE_EVOLUTION_LACKOFCOST)
				{
					bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.IsVisible();
					if (flag2)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.SetVisible(false);
					}
					XSingleton<UiUtility>.singleton.ShowItemAccess(XSingleton<XGlobalConfig>.singleton.GetInt("SpriteStarUpItemID"), null);
				}
			}
			else
			{
				switch (oArg.Type)
				{
				case SpriteType.Sprite_Feed:
				{
					for (int i = 0; i < this._spriteList.Count; i++)
					{
						bool flag3 = this._spriteList[i].uid == oArg.uid;
						if (flag3)
						{
							this._spriteList[i].Exp = oRes.Exp;
							break;
						}
					}
					bool flag4 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null;
					if (flag4)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.OnServerReturn(oArg.uid);
					}
					XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
					for (int j = 0; j < (int)this.FoodList.Count; j++)
					{
						bool flag5 = this.FoodList[j, 0] == (int)oArg.FeedItemID;
						if (flag5)
						{
							this._expTotal += (uint)this.FoodList[j, 1];
							break;
						}
					}
					XSingleton<XTimerMgr>.singleton.KillTimer(this._timerToken);
					this._timerToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)this._showExpTime, new XTimerMgr.ElapsedEventHandler(this.ShowGetExp), null);
					break;
				}
				case SpriteType.Sprite_Evolution:
				case SpriteType.Sprite_Train:
				case SpriteType.Sprite_ResetTrain:
				case SpriteType.Sprite_Rebirth:
				{
					bool flag6 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.IsVisible();
					if (flag6)
					{
						bool flag7 = oArg.Type == SpriteType.Sprite_Train;
						if (flag7)
						{
							DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.LastAttrList.Clear();
							DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.LastValueList.Clear();
							for (int k = 0; k < oRes.LastTrainAttrID.Count; k++)
							{
								DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.LastAttrList.Add((int)oRes.LastTrainAttrID[k]);
								DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.LastValueList.Add((int)oRes.LastTrainAttrValue[k]);
							}
						}
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._StarUpWindow.OnServerReturn(oArg.Type);
					}
					break;
				}
				case SpriteType.Sprite_Awake:
				{
					bool flag8 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow == null || !DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow.IsVisible();
					if (flag8)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.Awake);
					}
					bool flag9 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow != null;
					if (flag9)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow.SetSpritesInfo(oRes.AwakeSpriteBefore, oRes.AwakeSprite);
					}
					bool flag10 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null;
					if (flag10)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.RefreshAwakeBtn();
					}
					break;
				}
				case SpriteType.Sprite_Awake_Retain:
				case SpriteType.Sprite_Awake_Replace:
				{
					bool flag11 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow != null;
					if (flag11)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow.SetVisible(false);
					}
					break;
				}
				case SpriteType.Sprite_InFight:
				case SpriteType.Sprite_OutFight:
				case SpriteType.Sprite_SwapLeader:
				{
					this.SetFightList(oRes.InFight);
					this.CalNeed2FightSprite();
					bool flag12 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame.IsVisible() && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame._SpriteSelectHandler != null;
					if (flag12)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame._SpriteSelectHandler.SetSpriteList(this._spriteList, false);
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame.RefreshFightList();
					}
					break;
				}
				case SpriteType.Sprite_Decompose:
				{
					bool flag13 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.IsVisible();
					if (flag13)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.Clean();
					}
					break;
				}
				case SpriteType.Sprite_QueryEvolutionPPT:
				{
					bool flag14 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.IsVisible();
					if (flag14)
					{
						DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.StarUp);
					}
					break;
				}
				}
			}
		}

		// Token: 0x06009A86 RID: 39558 RVA: 0x001873DC File Offset: 0x001855DC
		public double GetSpriteLevelRatio(uint quality, uint level)
		{
			for (int i = 0; i < this._SpriteLevelTable.Table.Length; i++)
			{
				SpriteLevel.RowData rowData = this._SpriteLevelTable.Table[i];
				bool flag = rowData.Quality == level && rowData.Level == level;
				if (flag)
				{
					return rowData.Ratio;
				}
			}
			return 0.0;
		}

		// Token: 0x06009A87 RID: 39559 RVA: 0x00187448 File Offset: 0x00185648
		private void ShowGetExp(object o = null)
		{
			XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
			XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SpriteExpTips"), this._expTotal), "fece00");
			this._expTotal = 0U;
		}

		// Token: 0x06009A88 RID: 39560 RVA: 0x00187492 File Offset: 0x00185692
		public void ShowGetSpriteWithAnimation(uint spriteID, uint ppt)
		{
			DlgBase<XSpriteShowView, XSpriteShowBehaviour>.singleton.ShowDetail(spriteID, ppt, false);
		}

		// Token: 0x06009A89 RID: 39561 RVA: 0x001874A4 File Offset: 0x001856A4
		private bool _OnBuffChange(XEventArgs args)
		{
			XBuffChangeEventArgs xbuffChangeEventArgs = args as XBuffChangeEventArgs;
			bool flag = xbuffChangeEventArgs.addBuff != null && xbuffChangeEventArgs.addBuff.buffInfo != null;
			if (flag)
			{
				bool flag2 = XBuff.HasTag(xbuffChangeEventArgs.addBuff.buffInfo, XBuffTag.BT_SpriteEffect);
				if (flag2)
				{
					XSpriteSystemDocument.SpriteSkillCast(xbuffChangeEventArgs.entity);
				}
			}
			return true;
		}

		// Token: 0x06009A8A RID: 39562 RVA: 0x00187500 File Offset: 0x00185700
		public static void SpriteSkillCast(XEntity entity)
		{
			bool isPlayer = entity.IsPlayer;
			if (isPlayer)
			{
				uint leaderid = entity.Attributes.Outlook.sprite.leaderid;
				SpriteTable.RowData bySpriteID = XSpriteSystemDocument._spriteTable.GetBySpriteID(leaderid);
				bool flag = bySpriteID != null;
				if (flag)
				{
					XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
					SpriteSkill.RowData mySpriteInitiativeSkill = specificDocument.GetMySpriteInitiativeSkill();
					bool flag2 = mySpriteInitiativeSkill != null;
					if (flag2)
					{
						bool flag3 = !XSingleton<XGame>.singleton.SyncMode && mySpriteInitiativeSkill.ShowNotice[0] != 0;
						if (flag3)
						{
							XInvitationDocument specificDocument2 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
							NoticeTable.RowData noticeData = specificDocument2.GetNoticeData(NoticeType.NT_SPRITE_SKILLCAST);
							bool flag4 = noticeData == null;
							if (flag4)
							{
								return;
							}
							StringBuilder stringBuilder = new StringBuilder(noticeData.info);
							stringBuilder.Replace("$R", XStringDefineProxy.GetString("YOU"));
							int num = XSpriteSystemDocument._Find(stringBuilder, "$C");
							bool flag5 = num != -1;
							if (flag5)
							{
								stringBuilder.Replace("$C", bySpriteID.SpriteName, num, 2);
							}
							num = XSpriteSystemDocument._Find(stringBuilder, "$C");
							bool flag6 = num != -1;
							if (flag6)
							{
								stringBuilder.Replace("$C", mySpriteInitiativeSkill.SkillName, num, 2);
							}
							num = XSpriteSystemDocument._Find(stringBuilder, "$C");
							bool flag7 = num != -1;
							if (flag7)
							{
								stringBuilder.Replace("$C", mySpriteInitiativeSkill.NoticeDetail, num, 2);
							}
							KKSG.ChatInfo chatInfo = new KKSG.ChatInfo();
							chatInfo.info = stringBuilder.ToString();
							chatInfo.channel = (uint)noticeData.channel;
							XChatDocument specificDocument3 = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
							specificDocument3.HandlerReceiveChatInfo(chatInfo);
						}
						bool flag8 = mySpriteInitiativeSkill.ShowNotice[1] != 0;
						if (flag8)
						{
							XAffiliate xaffiliate = null;
							bool flag9 = !entity.IsTransform && entity.Equipment != null;
							if (flag9)
							{
								xaffiliate = entity.Equipment.Sprite;
							}
							bool flag10 = xaffiliate != null;
							if (flag10)
							{
								XBubbleComponent xbubbleComponent = xaffiliate.GetXComponent(XBubbleComponent.uuID) as XBubbleComponent;
								bool flag11 = xbubbleComponent == null;
								if (flag11)
								{
									XSingleton<XComponentMgr>.singleton.CreateComponent(xaffiliate, XBubbleComponent.uuID);
								}
								XBubbleEventArgs @event = XEventPool<XBubbleEventArgs>.GetEvent();
								@event.bubbletext = mySpriteInitiativeSkill.SkillName;
								@event.existtime = 3f;
								@event.Firer = xaffiliate;
								@event.speaker = string.Empty;
								XSingleton<XEventMgr>.singleton.FireEvent(@event);
							}
						}
						bool flag12 = !string.IsNullOrEmpty(mySpriteInitiativeSkill.Audio);
						if (flag12)
						{
							XSingleton<XAudioMgr>.singleton.PlaySound(entity, AudioChannel.Action, mySpriteInitiativeSkill.Audio);
						}
					}
				}
			}
		}

		// Token: 0x06009A8B RID: 39563 RVA: 0x001877B4 File Offset: 0x001859B4
		private static int _Find(StringBuilder sb, string s)
		{
			int num = sb.Length - s.Length + 1;
			for (int i = 0; i < num; i++)
			{
				bool flag = true;
				int num2 = i;
				int num3 = 0;
				while (num2 < num && num3 < s.Length)
				{
					bool flag2 = sb[num2] != s[num3];
					if (flag2)
					{
						flag = false;
						break;
					}
					num2++;
					num3++;
				}
				bool flag3 = flag;
				if (flag3)
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x06009A8C RID: 39564 RVA: 0x00187844 File Offset: 0x00185A44
		private bool OnPlayerLevelChange(XEventArgs arg)
		{
			this.DealWithPositionLevelCondition();
			return true;
		}

		// Token: 0x04003507 RID: 13575
		public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("SpriteSystemDocument");

		// Token: 0x04003508 RID: 13576
		public static XTableAsyncLoader AsyncLoader = new XTableAsyncLoader();

		// Token: 0x04003509 RID: 13577
		private static SpriteTable _spriteTable = new SpriteTable();

		// Token: 0x0400350A RID: 13578
		private static SpriteLevel _spriteLevelTable = new SpriteLevel();

		// Token: 0x0400350B RID: 13579
		private static SpriteEvolution _spriteEvolutionTable = new SpriteEvolution();

		// Token: 0x0400350C RID: 13580
		private static SpriteSkill _spriteSkillTable = new SpriteSkill();

		// Token: 0x0400350D RID: 13581
		private static SpritePreviewTable _spritePreviewTable = new SpritePreviewTable();

		// Token: 0x0400350E RID: 13582
		private List<SpriteInfo> _spriteList = new List<SpriteInfo>();

		// Token: 0x0400350F RID: 13583
		private List<SpriteInfo> _resolveList = new List<SpriteInfo>();

		// Token: 0x04003510 RID: 13584
		private List<ulong> _fightingList = new List<ulong>();

		// Token: 0x04003511 RID: 13585
		private List<bool> _bookList = new List<bool>();

		// Token: 0x04003512 RID: 13586
		private HashSet<ulong> _fightHash = new HashSet<ulong>();

		// Token: 0x04003513 RID: 13587
		private HashSet<ulong> _redPointSpriteHash = new HashSet<ulong>();

		// Token: 0x04003514 RID: 13588
		private static Dictionary<uint, uint> _levelUpExpDict = new Dictionary<uint, uint>();

		// Token: 0x04003515 RID: 13589
		private static Dictionary<short, List<SpriteSkill.RowData>> _spriteSkillDict = new Dictionary<short, List<SpriteSkill.RowData>>();

		// Token: 0x04003516 RID: 13590
		private static Dictionary<int, List<uint>> _spriteEggIllustrationDict = new Dictionary<int, List<uint>>();

		// Token: 0x04003517 RID: 13591
		private static List<uint> _spriteShowInIllustration = new List<uint>();

		// Token: 0x04003518 RID: 13592
		public List<uint> PositionLevelCondition = new List<uint>();

		// Token: 0x04003519 RID: 13593
		private uint _maxFightNum;

		// Token: 0x0400351A RID: 13594
		private static readonly uint K_LEVELUPQUALITY = 10000U;

		// Token: 0x0400351B RID: 13595
		public static List<uint> MAXSTARLEVEL = new List<uint>
		{
			0U,
			0U,
			0U,
			0U,
			0U,
			0U
		};

		// Token: 0x0400351C RID: 13596
		public static uint MOONWORTH = 6U;

		// Token: 0x0400351D RID: 13597
		public string[] NAMECOLOR = new string[6];

		// Token: 0x0400351E RID: 13598
		private int SpriteRedPointShowIntervel;

		// Token: 0x0400351F RID: 13599
		private uint _timerToken;

		// Token: 0x04003520 RID: 13600
		private double _showExpTime;

		// Token: 0x04003521 RID: 13601
		private uint _expTotal = 0U;

		// Token: 0x04003522 RID: 13602
		public SeqList<int> FoodList;

		// Token: 0x04003523 RID: 13603
		public SpriteHandlerTag CurrentTag;

		// Token: 0x04003524 RID: 13604
		private uint GroupRatio;

		// Token: 0x04003525 RID: 13605
		private int _starUpLimitLevel;

		// Token: 0x0400352C RID: 13612
		public List<ItemBrief> CachedLotteryResult = new List<ItemBrief>();

		// Token: 0x0400352D RID: 13613
		public List<uint> CachedLotteryPPT = new List<uint>();

		// Token: 0x0400352E RID: 13614
		public List<bool> ResultShowList = new List<bool>();

		// Token: 0x04003530 RID: 13616
		private float LastLotteryTime = 0f;

		// Token: 0x04003531 RID: 13617
		public SpriteInfo _AwakeSpriteData = null;
	}
}
